<%@ page language="java" contentType="text/html; charset=UTF-8" import="org.springframework.ui.ModelMap" import="java.util.*,com.device.operating.entity.*"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="/xasj/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/xasj/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="/xasj/easyui/themes/color.css">
<script type="text/javascript" src="/xasj/easyui/jquery.min.js"></script>
<script type="text/javascript" src="/xasj/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/xasj/js/org/editdepartment.js"></script>
</head>
<%Department dp=(Department)request.getAttribute("dp");
List<Role> listrole=(List<Role>)request.getAttribute("listrole");
List<Dprole> listdprole =(List<Dprole>) request.getAttribute("listdprole");
List<User> listuser=(List<User>)request.getAttribute("listuser");
%>
<body>
<div id="aa" class="easyui-accordion"   data-options="fit:true,animate:false">

<input id="departmentId" value="<%=dp.getDepartmentId()%>"style="display: none"/>
<div title="部门详细信息编辑" data-options="iconCls:'icon-ok',fit:true" style="overflow:auto;padding-left:15px;padding-top:5px">	
		<form id="st1">
		<table style="padding-top:22px;padding-left:10px" width="100%" border="1"
		cellspacing="0" cellpadding="0" bordercolor="#666666" >
		<tr height="40px">
		<td width="10%">隶属部门名称：</td>		
		<td width="20%">
		<input id="rootdpname" value="<%=dp.getRootdpname()%>" style="width:98%;height:98%;disabled:true">
		</td>
		<td width="10%"></td>
		<td width="20%"></td>
		<td width="10%"></td>
		<td width="20%"></td>
		</tr>			
		
		<tr height="40px">
		<td>部门名称：</td>
		<td>
		<input id="dpname" value="<%=dp.getDpname()%>" class="easyui-validatebox" data-options="required:true"style="width:98%;height:98%"/>
		</td>
		<td >部门位置：</td>				
		<td>
		<input id="dploc" value="<%=dp.getDploc()%>" style="width:98%;height:98%">
		</td>
		</tr>
		
		<tr height="40px">
		<td>部门领导：</td>
		<td>
		<slect id="dpleader"class="easyui-combobox" data-options="required:true" style="width:98%;height:98%">
		<% for(User user:listuser){%>
			<option 
				<%if(dp.getLeaderId()!=null&&dp.getLeaderId().equals(user.getUserId())){%>
					selected="selected"
				<%}%> value="<%=user.getUserId()%>">
			<%=user.getUsername()%></option>
		<%}%>
		</slect>
		</td>
		<td >部门职位：</td>				
		<td>
		<select id="dprole" style="width:98%;height:98%" class="easyui-combobox"data-options="multiple:true,required:true">
<%-- 		<% for(Role role:listrole){%>
			<option <%for(Dprole dprole:listdprole){
				if(dprole.getRoleId().equals(role.getRoleId())){%>
					selected=true
				<%break;}
			}%> value="<%=role.getRoleId()%>">
			<%=role.getRolename()%></option>
		<%}%>--%>
		<% for(Role role:listrole){%>
			<option value="<%=role.getRoleId()%>">
			<%=role.getRolename()%></option>
		<%}%>
		</select>
		</td>
		</tr>
		<tr height="40px">
		<td>部门电话：</td>
		<td>
		<input id="dptel" class="easyui-validatebox" value="<%=dp.getDptel()%>" data-options="required:true" style="width:98%;height:98%"/>
		</td>
		</tr>
		<tr height="60px" >
		<td>职责描述：</td>
		<td colspan="4"><input class="easyui-textbox" style="width:98%;height:98%" data-options="multiline:true"/></td>
		</tr>
		<tr height="28px">
		<td></td>
		<td>
		<a id="comeditdepartment" class="easyui-linkbutton c8" data-options="toggle:true,plain:true,group:'g3'"style="width:99%;height:30px">完成编辑</a>
		</td>
		</tr>
		</table>
		</form>
		</div>
		
		
		
		</div>

</body>
</html>